<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
/* <![CDATA[ */
table, td
{
    border-color: #666;
    border-style: solid;
}
table, th
{
    border-color: #666;
    border-style: solid;
}

table
{
    border-width: 0 0 1px 1px;
    border-spacing: 0;
    border-collapse: collapse;
}
 
td
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}
th
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}
/* ]]> */


</style>
</head>
<body style="font-family:Arial, Helvetica, sans-serif" >
<h1>Pickup Slip For <?php echo $this->pon;?></h1>
<h2>Date Print :<?php echo $this->dateTime;?></h2>
<?php $check2 = true;?>
<form action="" method="post" >
<table width="750" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <th rowspan="2" >Code</th>
    <th rowspan="2" style="width:200px;" >Des</th>
    <th colspan="2" style="width:50px;" >SALE</th>
    <th rowspan="2" style="width:25px;">Faulty</th>
    <th colspan="3" style="width:50px;" >STOCK</th>
    <th rowspan="2" style="width:5px;">&nbsp;</th>
    <th colspan="3" >OD</th>
    <th colspan="2" rowspan="2" style="width:100px;">Reason</th>
  </tr>
  <tr>
    <th >Ave</th>
    <th >Max</th>
    <th >Sys</th>
    <th >Act</th>
    <th >WH</th>
    <th>Recc-Order</th>
    <th>Act-Order</th>
    <th>Total</th>
    
  </tr>
<?php 
	$rProduct = new Model_DbTable_Pr_Prproducts();
	$rStock = new Model_DbTable_Pr_Prstock();
foreach($this->oList as $key => $v){
	if($v['code_product']!="SERVICE" && $v['code_product']!="CUSTPART" && ($v['qty_order_actual'] > 0 || ($v['qty_backorder'] >0 && $v['qty_onhand_cf'] <= 2* $v['qty_last_week']))){
	//$str = ($v["qty_order_actual"]==0)?"text-decoration:line-through":"";
	?> 
	<?php if($v["qty_order_actual"] == 0 && $check2 == true){
				$check = true;?>
			<?php if($check == true){?>
			<tr>
				<th colspan = "14" align = "center"> Back Order List</th>
				<?php $check2 = false;?>
			</tr>
			<?php }?>
	<?php }?>
  <tr>
    <td><?php echo $v['code_product']?></td>
    <td><span style="font-size:12px;"><?php echo $rProduct->getProductDes($v['code_product'])?></span></td>
    <td><?php echo $v['qty_last_week']?></td>
    <td><?php echo $v['qty_max_week']?></td>
    <td><?php echo $v['qty_fo_last_week']?></td>
    <td><?php echo $v['qty_onhand']?></td>
    <td><?php echo $v['qty_onhand_cf']?></td>
    <td><?php 
    $skLine = $rStock->getWarehouseStock($v['id_product']);
    echo $skLine;
    ?></td>
    <td style="border-left:#333 solid 5px;">&nbsp;</td>
    <td><?php echo $v['qty_order']?> + [<?php echo $v['qty_backorder']?>]</td>
    <td><?php echo $v['qty_order_actual'] ?> + [<?php echo $v['qty_backorder']?>]</td>
    <td><?php echo ($v['qty_order_actual'] + $v['qty_backorder']) ?></td>
    <td><?php echo $v['reason']?></td>
    <td><input name="del[]" type="checkbox" id="del_<?php echo $v['id_order']?>" value="<?php echo $v['id_order']?>" />
      <label for="del"></label></td>
  </tr>
<?php }

}?>  
</table><br />
<br />
<input name="" type="submit" value="Submit" onclick="javascript:return confirm('Double Checked What you want to Remove!!')" />
</form>
<div style=" font-size:10px; color:#666;float:right;" >Developer:Leo,Date:2015-06-03,ver:1.01</div>
</body>
</html>
